<?xml version="1.0" encoding="UTF-8" ?>
<%@page import="com.baoyanghui.model.MerchantType"%>
<%@page import="java.lang.reflect.Field"%>
<%@page import="net.sf.json.JSONArray"%>
<%@page import="com.baoyanghui.model.ResultObject"%>
<%@page import="com.baoyanghui.common.DataChanger"%>
<%@page import="com.baoyanghui.common.InterfaceAccess"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.List"%>
<%@page import="com.baoyanghui.model.MerchantPlace"%>
<%@page import="com.baoyanghui.model.Merchant"%>
<%@page import="net.sf.json.JSONObject"%>
<%@page import="com.baoyanghui.config.Configs"%>
<%@page import="com.baoyanghui.common.Utils"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% 
	String errorMessage = (String)session.getAttribute("error_message"); 
	session.removeAttribute("error_message");

	JSONObject merchantTypes = null;
	MerchantType merchantType = null;
	List<MerchantType> merchantTypeList = null;
	Map<String, String> params = new HashMap<String, String>();
	
	try {
		request.setCharacterEncoding("UTF-8");
		
		merchantTypes = InterfaceAccess.callInterface("/get_merchant_types", params);
		merchantTypeList = (List<MerchantType>)JSONArray.toList(merchantTypes.getJSONArray("resultData"), MerchantType.class);
	} catch (Exception e) {
	}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" type="text/css" href="../css/style.css"/>
		<script type="text/javascript" src="../js/jquery.js"></script>
		<script type="text/javascript" src="../js/customer_top.js"></script>
		<script type="text/javascript" src="../js/page.js"></script>
		<script type="text/javascript" src="../js/common.js"></script>
		<script type="text/javascript">saveWSContextPath('<%= request.getContextPath() %>', '<%= InterfaceAccess.InterfaceContext %>');</script>
		<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language=zh-CN"></script>
		<script type="text/javascript" src="<%= request.getContextPath() %>/js/infoWindow.js"></script>
		<script type="text/javascript" src="<%= request.getContextPath() %>/js/near.js"></script>
		<title>宝养汇</title>
	</head>
	<body onload="saveWSContextPath('<%= request.getContextPath() %>', '<%= InterfaceAccess.InterfaceContext %>');"
		style="background: url('<%= request.getContextPath() %>/image/bg_customer_main.png');">
		<jsp:include page="../common/header.jsp"></jsp:include>
		<div style="width: 500px; padding-top: 10px; padding-left: 20px; font-size: 12pt;">
			<div style="width: 133px; height: 42px; float: left; background: url(../image/bg_slt_selected.png) no-repeat;"
				id="slt_type" class="pointer fade_effect" onclick="toggleTypeList();">
				<span style="margin-top: 10px;">附件</span>
			</div>
			<div id="slt_type_list" style="width: 137px; position: absolute; display: none; z-index: 1999;">
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect"><span style="margin-top: 8px;">附近</span></div>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect"><span style="margin-top: 8px;">养车比价</span></div>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect"><span style="margin-top: 8px;" onclick="window.location='release_request.jsp'">发布供求</span></div>
			</div>
			
			<div style="width: 133px; height: 42px; margin-left: 20px; float: left; background: url(../image/bg_slt_selected.png) no-repeat;"
				id="slt_district" class="pointer fade_effect" onclick="toggleDistrictList();">
				<span style="margin-top: 10px;" id="slt_display_text">选择商圈</span>
			</div>
			<div id="slt_district_list" style="width: 137px; position: absolute; display: none; z-index: 1999;">
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changeArea('选择商圈', '');"><span style="margin-top: 8px;">选择商圈</span></div>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changeArea('五角场','31.2992419,121.515475');"><span style="margin-top: 8px;">五角场</span></div>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changeArea('南京西路','31.2292969,121.459026');"><span style="margin-top: 8px;">南京西路</span></div>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changeArea('南京东路','31.2351145,121.480418');"><span style="margin-top: 8px;">南京东路</span></div>
			</div>
			
			<div style="width: 133px; height: 42px; margin-left: 20px; float: left; background: url(../image/bg_slt_selected.png) no-repeat;"
				id="slt_place_type" class="pointer fade_effect" onclick="togglePlaceTypeList();">
				<span style="margin-top: 10px;" id="slt_place_type_text">全部</span>
			</div>
			<div id="slt_place_type_list" style="width: 137px; position: absolute; display: none; z-index: 1999;">
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changePlaceType('全部', '');"><span style="margin-top: 8px;">全部</span></div>
<%
	for (int i = 0; merchantTypeList != null && i < merchantTypeList.size(); i++) {
		merchantType = merchantTypeList.get(i);
%>
				<div style="width: 128px; height: 37px; background: url(../image/bg_slt_list.png) no-repeat;"
					class="pointer fade_effect" onclick="changePlaceType('<%= merchantType.getTypeName() %>','<%= merchantType.getTypeId() %>');">
						<span style="margin-top: 8px;"><%= merchantType.getTypeName() %></span></div>
<%
	}
%>
			</div>
			<div style="clear: both;"></div>
		</div>
		<div style="min-width: 1000px; height: 9px; margin-top: 10px; background: url('<%= request.getContextPath() %>/image/border_near_top.png');"></div>
		<div id="div_customer_top_tabhost" align="left" style="min-width: 1000px;">
       		<div id="div_places" style="width: 350px; height:855px; position: relative; top: -5px; float: left; background: url('../image/line_vertical_gradient.png') right repeat-y;">
			</div>
			<div id="map_canvas" style="width:600px; height:850px; float: left;"></div>
			<div style="clear: both;"></div>
			<div id="dlg_comment" style="width: 295px; position: absolute; left: 0px; top: 0px; display: none;">
				<div style="width: 295px; height: 35px; background: url('../image/bg_comment_top.png')"></div>
				<div style="width: 295px; padding: 10px; background: url('../image/bg_comment.png')">
					<div style="font-size: 18px; font-weight: bold; padding-top: 7px;">我要评价</div>
					<div style="padding-top: 10px;"><img src='../image/line_gray_white.png' width='100%' height='2px'/></div>
					<div style="padding-top: 10px;">
						<span style="width: 70px; display: inline-block; text-align: right;">总体评价：</span>
						<span style="color: red;">*</span>
						<input type="hidden" id="general_satisfaction" value="1"/>
						<img src="../image/icon_red_star.png"/>
						<img src="../image/icon_gray_star.png"/>
						<img src="../image/icon_gray_star.png"/>
						<img src="../image/icon_gray_star.png"/>
						<img src="../image/icon_gray_star.png"/>
					</div>
					<div style="vertical-align: top; padding-top: 10px;">
						<span style="width: 70px; display: inline-block; text-align: right; vertical-align: top;">服务满意度:</span>
						<span style="color: red; vertical-align: top;">*</span>
						<input type="hidden" id="service_satisfaction" value="1"/>
						<div style="width: 23px; height: 23px; display: inline-block; cursor: pointer; background: url('<%= request.getContextPath() %>/image/radio_round_checked.png');"
							onclick="selectServiceSatisfaction(1);"></div>
						好<img src="../image/icon_red_flower.png" align="top"/>
						<div style="width: 23px; height: 23px; display: inline-block; cursor: pointer; background: url('<%= request.getContextPath() %>/image/radio_round_checked.png');"
							onclick="selectServiceSatisfaction(2);"></div>
						中<img src="../image/icon_orange_flower.png" align="top"/>
						<div style="width: 23px; height: 23px; display: inline-block; cursor: pointer; background: url('<%= request.getContextPath() %>/image/radio_round_checked.png');"
							onclick="selectServiceSatisfaction(3);"></div>
						差<img src="../image/icon_gray_flower.png" align="top"/>
					</div>
					<div>
						<span style="width: 70px; display: inline-block; text-align: right;">评价:</span>
					</div>
					<div>
						<textarea id="txt_comment" style="width: 271px; height: 95px; border: none; background: url('../image/bg_textarea.png') no-repeat;"></textarea>
					</div>
					<div align="center" style="padding-top: 10px;">
						<img src="../image/btn_submit_comment.png"/>
						<img src="../image/btn_cancel3.png" style="margin-left: 15px;" onclick="hideCommentDlg();"/>
					</div>
				</div>
				<div style="width: 295px; height: 36px; background: url('../image/bg_comment_bottom.png')"></div>
			</div>
		</div>
		<jsp:include page="../common/footer.jsp" />
	</body>
</html>